package ${geneGlobalConfig.basePackage}.${geneGlobalConfig.entry};

<#if geneModelConfig??>
<#if geneModelConfig.lombok>import lombok.Data;</#if>
<#if geneModelConfig.toStr>import lombok.ToString;</#if>
<#if geneModelConfig.noArgsConstructor>import lombok.NoArgsConstructor;</#if>
<#if geneModelConfig.allArgsConstructor>import lombok.AllArgsConstructor;</#if>
</#if>
<#if geneModelConfig.jsonFormat && geneImportConfig.importDate>
import com.fasterxml.jackson.annotation.JsonFormat;
</#if>
<#if geneModelConfig.dateTimeFormat && geneImportConfig.importDate>
import org.springframework.format.annotation.DateTimeFormat;
</#if>

<#if geneModelConfig.serializable>import java.io.Serializable;</#if>
<#if geneImportConfig??>
<#if geneImportConfig.importDate>
import java.util.Date;
</#if>
</#if>

/**
* <#if geneTable.tableComment??>${geneTable.tableComment}</#if>
<#if geneGlobalConfig?? && "" != geneGlobalConfig.author>* @author ${geneGlobalConfig.author}</#if>
<#if geneGlobalConfig?? && geneGlobalConfig.createTime>* @date ${.now}</#if>
*/
<#if geneModelConfig??>
<#if geneModelConfig.lombok>@Data</#if>
<#if geneModelConfig.toStr>@ToString</#if>
<#if geneModelConfig.noArgsConstructor>@NoArgsConstructor</#if>
<#if geneModelConfig.allArgsConstructor>@AllArgsConstructor</#if>
</#if>
public class ${geneTable.tableName} <#if geneModelConfig.serializable>implements Serializable</#if> {

<#if geneModelConfig.serializable>
    private static final long serialVersionUID = 1L;
</#if>

<#if geneTable.columns??>
    <#list geneTable.columns as column>
    /**
    * ${column.columnComment}
    <#if "Date" == column.columnType>
    <#if geneModelConfig.jsonFormat && geneImportConfig.importDate>* 注解@JsonFormat:从数据库读出日期格式时，进行转换的规则</#if>
    <#if geneModelConfig.dateTimeFormat && geneImportConfig.importDate>* 注解@DateTimeFormat:接受从前端传入的日期格式，映射到java类日期属性的规则</#if>
    </#if>
    */
<#if "Date" == column.columnType>
<#if geneModelConfig.jsonFormat>
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
</#if>
<#if geneModelConfig.dateTimeFormat>
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
</#if>
</#if>
    private ${column.columnType} ${column.columnNameCamel};

    </#list>
</#if>
}
